/*

Weapon.js

Defines basic instance variables and methods for any weapon in the game

*/

function Weapon(name, maxHP, startHP, startLevel) {
	this.name=name;
	this.HP=startHP;
	this.maxHP=maxHP;
	this.level=startLevel;
}

Weapon.method('getName', function () {
	return this.name;
});


Weapon.method('getHP', function () {
	return this.HP;
});

Weapon.method('reduceHP', function (reduction) {
	this.HP -= reduction;
});

Weapon.method('increaseHP', function (increase) {
	this.HP += increase;
});

Weapon.method('setHP', function (HP) {
	this.HP = HP;
});


Weapon.method('getMaxHP', function () {
	return this.maxHP;
});

Weapon.method('setMaxHP', function (maxHP) {
	this.maxHP = maxHP;
});


Weapon.method('getLevel', function () {
	return this.level;
});

Weapon.method('incrementLevel', function () {
	this.level++;
});

Weapon.method('setLevel', function (level) {
	this.level = level;
});